#pragma once
#include <string>
#include "Structure.h"
#include "json.h"

class ParamsLoader {
private:
	Json::Value value;
	Json::Value GetLayerValueByName(std::string name);
public:
	void LoadFromFile(std::string path);
	void LoadFromString(std::string file);
	const DL::Tensor1D<float>& LoadTensor1DFloat(std::string name);
	const DL::Tensor2D<float>& LoadTensor2DFloat(std::string name);
	const DL::Tensor3D<float>& LoadTensor3DFloat(std::string name);
	const DL::Tensor4D<float>& LoadTensor4DFloat(std::string name);
	const DL::Tensor1D<int8>& LoadTensor1DInt8(std::string name);
	const DL::Tensor2D<int8>& LoadTensor2DInt8(std::string name);
	const DL::Tensor3D<int8>& LoadTensor3DInt8(std::string name);
	const DL::Tensor4D<int8>& LoadTensor4DInt8(std::string name);
	float LoadfloatValue(std::string name);
	int LoadIntValue(std::string name);
};